package com.micro.service.common.enums;

/**
 * @author lvxiucai
 * @description 自定义错误异常
 * @date 2019/7/11
 */
public enum SysErrorEnum {

    /**
     *成功
     */
    SYS_SUCCESS("200","SUCCESS"),
    /**
     * 参数校验
     */
    PARAM_NOT_NULL("301","参数不能为空"),

    CHECK_NOT_PASS("302","审核出错"),
    /**
     *未授权或者未登录
     */
    NOT_AUTHORIZED("401","未授权或未登录"),

    /**
     *系统异常
     */
    SYS_ERROR("500","系统错误"),

    /**
     * 用户模块相关错误以6开头
     */
    ACCOUNT_ERROR("6000","用户模块系统异常"),

    ACCOUNT_USNAME_NOT_NULL("6001","用户名不能为空"),
    ACCOUNT_HAS_BIND_WX("6200","该微信已有账号"),
    ACCOUNT_HAS_BIND_MOBILE("6300","该手机号已绑定账号"),
    /**
     * 新闻相关错误以7开头
     */
    NEWS_ERROR("7000","新闻模块系统异常"),

    /**
     *情报站相关错误8开头
     */
    INTELLIGENT_ERROR("8000","情报站模块系统异常"),
    /**
     *活动相关错误9开头
     */
    ACTIVITY_ERROR("9000","活动模块系统异常"),
    ;


    private String code;
    private String msg;

    SysErrorEnum(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

}
